Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2597: Add epic relations #183

Merged
merged 161 commits into from
Jan 13, 2025
Merged

Conversation

jeppekroghitk
Copy link
Contributor

@jeppekroghitk jeppekroghitk commented Jan 2, 2025

Link to ticket

2597

Description

This PR adds relations for epics.

Screenshot of the result

N/A

Checklist

  • My code is covered by test cases.
  • My code passes our test (all our tests).
  • My code passes our static analysis suite.
  • My code passes our continuous integration process.

@jeppekroghitk jeppekroghitk mentioned this pull request Jan 2, 2025
4 tasks
@jeppekroghitk jeppekroghitk requested a review from tuj January 2, 2025 14:09
$epic = new Epic();
$epic->setTitle($epicTitle);
$this->entityManager->persist($epic);
$this->entityManager->flush();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for flush here.

@@ -0,0 +1,17 @@
<?php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file.

@@ -271,6 +274,26 @@ public function syncIssuesForProject(int $projectId, ?callable $progressCallback
}
}

$epicArray = explode(',', $issueDatum->epicName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of exploding here, issueDatum should include an array of Epics, and LeantimeDataProvider and JiraDataProvider should supply the array of epics.

@jeppekroghitk jeppekroghitk requested a review from tuj January 3, 2025 15:08
@tuj tuj added the enhancement New feature or request label Jan 6, 2025
@jeppekroghitk jeppekroghitk mentioned this pull request Jan 6, 2025
4 tasks
@@ -2,6 +2,7 @@

namespace App\Model\Invoices;

use App\Entity\Epic;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should mix Entity with Model.
The collection $epics could just be an array of strings instead. Then you can map to Epic entity in DataSynchronizationService.

@@ -53,6 +55,7 @@ public function __construct(
protected readonly float $weekGoalLow,
protected readonly float $weekGoalHigh,
protected readonly string $sprintNameRegex,
private readonly EpicRepository $epicRepository,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not do anything with Entities in the ApiServices.

jeppekroghitk and others added 28 commits January 13, 2025 12:30
…iod-average-etc

3489: workload report period average + etc
@jeppekroghitk jeppekroghitk merged commit f89fbb4 into develop Jan 13, 2025
9 checks passed
@jeppekroghitk jeppekroghitk deleted the feature/2597-add-epic-relations branch January 13, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants